# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=URI
pkgname=perl-${_realname}
pkgver=1.76
pkgrel=1
pkgdesc="Uniform Resource Identifiers (absolute and relative)"
arch=('any')
url="https://metacpan.org/${_realname}/"
groups=('perl-modules')
license=('PerlArtistic')
depends=('perl>=5.10.0')
checkdepends=('perl-Test-Needs')
provides=('perl-URI-Escape=3.30')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/O/OA/OALDERS/${_realname}-${pkgver}.tar.gz")
sha256sums=('b2c98e1d50d6f572483ee538a6f4ccc8d9185f91f0073fd8af7390898254413e')

build() {
  cd "${srcdir}/${_realname}-$pkgver"
  # install module in vendor directories.
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-$pkgver"
  make install DESTDIR="${pkgdir}"
}
